package org.jinion.result.table;

import org.jinion.constants.DataTypeEnum;

/**
 * @author zhlmmc
 *
 */
public class TableColumn {
	private int index;
	private String columnLable;
	private String columnName;
	private DataTypeEnum dataType;
	private String tableName;
	private boolean autoIncrement;
	private boolean nullable;
	private AbstractTable parentTable;
	
	public TableColumn(AbstractTable parentTable){
		this.parentTable = parentTable;
	}
	
	public TableColumn(AbstractTable parentTable, int index){
		this(parentTable);
		this.index = index;
	}
	public int getIndex() {
		return index;
	}
	public String getColumnLable() {
		return columnLable;
	}
	public void setColumnLable(String columnLable) {
		this.columnLable = columnLable;
	}
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public boolean isAutoIncrement() {
		return autoIncrement;
	}
	public void setAutoIncrement(boolean autoIncrement) {
		this.autoIncrement = autoIncrement;
	}
	public boolean isNullable() {
		return nullable;
	}
	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}
	public DataTypeEnum getDataType() {
		return dataType;
	}
	public void setDataType(DataTypeEnum dataType) {
		this.dataType = dataType;
	}
	public AbstractTable getParentTable() {
		return parentTable;
	}
}
